package city.spring.modules.material.service;

import city.spring.modules.material.entity.MaterialBreakageDeliveryEntity;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Service：报损出库
 *
 * @author 谢金婷
 * @date 2021-01-20 10:51:40
 */
public interface MaterialBreakageDeliveryService extends IService<MaterialBreakageDeliveryEntity> {
    String CACHE_NAME = "material_breakage_delivery";

    /**
     * 业务处理：保存一个 <strong>报损出库</strong>
     *
     * @param entity 报损出库
     */
    void saveMaterialBreakageDelivery(MaterialBreakageDeliveryEntity entity);

    /**
     * 业务处理：修改一个 <strong>报损出库</strong>
     *
     * @param entity 报损出库
     */
    void updateMaterialBreakageDelivery(MaterialBreakageDeliveryEntity entity);

    /**
     * 业务处理：删除一个 <strong>报损出库</strong>
     *
     * @param primaryKey 主键ID
     */
    void deleteMaterialBreakageDelivery(String primaryKey);

    /**
     * 业务处理：删除多个 <strong>报损出库</strong>
     *
     * @param primaryKeys 主键ID列表
     */
    void deleteMaterialBreakageDelivery(List<String> primaryKeys);

    IPage<MaterialBreakageDeliveryEntity> listPage(Page<? extends MaterialBreakageDeliveryEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends MaterialBreakageDeliveryEntity> wrapper);

    /**
     * 报损出库确认
     * @param id
     * @param entity
     */
    void confirmDelivery(String id, MaterialBreakageDeliveryEntity entity);
}